-- GENERATED SPELL FOR [Malas the Corrupter] --


function spell0_28255(pUnit, Event) --@Burning Blaze,n/a--
pUnit:FullCastSpellOnTarget(58579,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28255', 30000, 1)
end

function spell1_28255(pUnit, Event) --@Raging Shadows,Self--
pUnit:FullCastSpellOnTarget(57854,pUnit)
pUnit:RegisterEvent('Sorts_28255', 5000, 1)
end

function spell2_28255(pUnit, Event) --@Wavering Will,n/a--
pUnit:FullCastSpellOnTarget(51676,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28255', 15312, 1)
end

function Sorts_28255(pUnit, Event)
local choix_sorts_28255 = math.random(0, 2)
if choix_sorts_28255 == 0 then
pUnit:RegisterEvent('spell0_28255', 1, 1)
end
if choix_sorts_28255 == 1 then
pUnit:RegisterEvent('spell1_28255', 1, 1)
end
if choix_sorts_28255 == 2 then
pUnit:RegisterEvent('spell2_28255', 1, 1)
end
end

function mob28255_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28255', math.random(1500, 3000), 1)
end

function mob28255_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28255_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28255_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28255, 1, 'mob28255_Action')
RegisterUnitEvent(28255, 2, 'mob28255_Leave')
RegisterUnitEvent(28255, 3, 'mob28255_Kill')
RegisterUnitEvent(28255, 4, 'mob28255_Die')
